feat(cli): Clear persisted session file with /clear command#3145
Merged
DOsinga merged 1 commit intoblock:mainfrom Jul 16, 2025
Merged
feat(cli): Clear persisted session file with /clear command#3145DOsinga merged 1 commit intoblock:mainfrom
DOsinga merged 1 commit intoblock:mainfrom
Conversation
The command in the CLI now not only clears the in-memory chat history but also deletes and recreates the associated session file. This ensures that the chat context is fully reset, including any previously persisted messages, providing a more complete clear operation.
DOsinga
approved these changes
Jul 15, 2025
Collaborator
DOsinga
left a comment
There was a problem hiding this comment.
Thanks for doing this and sorry for the delay in responding!
lifeizhou-ap
added a commit
that referenced
this pull request
Jul 17, 2025
* main: feat(gcpvertexai): do HTTP 429 like retries for Anthropic API HTTP 529 overloaded status code (#3026) Fix a few ui edge cases - refresh occasionally crashing, chat loader over text and chat input height returning to auto (#3469) Don't default to main for build-cli (#3467) docs: add MongoDB MCP server tutorial (#2660) feat: run sub recipe multiple times in parallel (Experimental feature) (#3274) chore(release): release version 1.1.0 (#3465) chore: implement streaming for anthropic.rs firstparty provider (#3419) Fix regression: add back detail to tool-call banners (#3231) Document release process and update some just recipes (#3460) feat: add download_cli.ps1 file for windows (#3354) fix: session_file is optional (#3462) Bump more space for goose is working on it so it doesnt overlap incoming agent chat messages (#3453) Align chat input action buttons to bottom when large amount of text (#3455) docs: add Cloudflare MCP Server tutorial (#3278) feat(cli): Clear persisted session file with /clear command (#3145)
s-soroosh
pushed a commit
to s-soroosh/goose
that referenced
this pull request
Jul 18, 2025
Signed-off-by: Soroosh <soroosh.sarabadani@gmail.com>
kwsantiago
pushed a commit
to kwsantiago/goose
that referenced
this pull request
Jul 19, 2025
Signed-off-by: Kyle Santiago <kyle@privkey.io>
cbruyndoncx
pushed a commit
to cbruyndoncx/goose
that referenced
this pull request
Jul 20, 2025
atarantino
pushed a commit
to atarantino/goose
that referenced
this pull request
Aug 5, 2025
Signed-off-by: Adam Tarantino <tarantino.adam@hey.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(cli): Clear persisted session file with /clear command
The command in the CLI now not only clears the in-memory chat history but also deletes and recreates the associated session file. This ensures that the chat context is fully reset, including any previously persisted messages, providing a more complete clear operation.
Possibly fixes #3138
Screenshot of behavior including the changes within this pull request:

Although it should possibly be noted, without these changes the current behavior seems to be that the memory shows as cleared the next time you interact with Goose. The session jsonl file remains until the next interaction with Goose. If the session is
/quitimmediately after a/clearthe session is not cleared.Example screenshot without the changes in this pull request (existing Goose behavior):

Thanks again for your work on this great project!